package com.glodon.paas.document.dao.mapper;

import java.util.Date;
import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.glodon.paas.document.dao.domain.ProjectMemberEntity;

public interface ProjectMemberMapper {

    int insert(ProjectMemberEntity record);

    ProjectMemberEntity selectByPrimaryKey(String id);

    int updateDefaultRole(@Param("projectId") String projectId, @Param("roleId") String roleId);

    int removeMember(@Param("id")String id);

    int acceptMember(@Param("id")String id,@Param("updateTime")Date updateTime);

    List<ProjectMemberEntity> selectAllMembers(@Param("projectId") String projectId, @Param("roleId") String roleId);

    int rejectMember(String id);

    int updateMemberStatus(@Param("id") String memberId, @Param("status") int status);

    int updateRoleOfMember(@Param("memberId") String memberId, @Param("projectId") String projectId,
                           @Param("oldRoleId") String oldRoleId, @Param("newRoleId") String newRoleId);
    ProjectMemberEntity getSingleMember(@Param("projectId")String projectId,@Param("roleId")String roleId,@Param("userId")String accountId,@Param("groupId")String groupId);
    List<ProjectMemberEntity> getAddedOrgs(@Param("projectId")String projectId,@Param("roleId")String roleId);
}
